// CyTargetLinker,
// a Cytoscape plugin to extend biological networks with regulatory interaction
//
// Copyright 2011-2013 Department of Bioinformatics - BiGCaT, Maastricht University
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//       http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
package cytargetlinker.data;

import java.util.HashMap;
import java.util.Map;

import cytoscape.CyEdge;
import cytoscape.CyNode;

public class Interaction implements Comparable<Interaction> {

	private CyNode source;
	private CyNode target;
	private Map<CyEdge, RIN> edges;
	
	public Interaction(CyNode source, CyNode target) {
		this.source = source;
		this.target = target;
		edges = new HashMap<CyEdge, RIN>();
	}
	
	
	@Override
	public int compareTo(Interaction interaction) {
		if(interaction.getSource().equals(getSource())) {
			if(interaction.getTarget().equals(getTarget())) {
				return 1;
			}
		}
		return 0;
	}


	// SETTERS & GETTERS
	
	public CyNode getSource() {
		return source;
	}
	public void setSource(CyNode source) {
		this.source = source;
	}
	public CyNode getTarget() {
		return target;
	}
	public void setTarget(CyNode target) {
		this.target = target;
	}
	public Map<CyEdge, RIN> getEdges() {
		return edges;
	}
	public void setEdges(Map<CyEdge, RIN> edges) {
		this.edges = edges;
	}
}